package com.carbohydrate42.kotlin_compose_demo.compose

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.TextField
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp


@Preview(showBackground = true, showSystemUi = true)
@Composable
fun BasicLayoutDemoPage() {

    Column() {
        SearchBar(
            modifier = Modifier.fillMaxWidth().height(56.dp),
            value = "这是一段硬编码",
        )
    }

}

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SearchBar(
    modifier: Modifier = Modifier,
    value: String,
) {
    TextField(
        value = value,
        onValueChange = {},
        modifier = modifier
    )
}